Nathan Martin

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 45 total)
  • Author
    Replies
  • in reply to: UPoC Write outbound #69446
    Nathan Martin
    Participant

      Richard,

      The “http-client” protocol can create replies from its query proc.

      in reply to: uudecode and base64 encode in tps proc using library #66425
      Nathan Martin
      Participant

        Hi,

        Try adding this after the open in your second file method:

        fconfigure $fh -translation binary

        (I don’t think the read_file method will work because it assumes you are working with text files and the default translation.)

        Nathan

        in reply to: please help with regular expression! #65718
        Nathan Martin
        Participant

          You may also want to try something like this…

          Code:

          regsub -all {(*{1,1}?-{12,20} (.+?) -{12,20}*)} $obx5 “n\2n\1” obx5

          foreach {headertype body} [split [string trim $obx5 “n”] “n”] {
           puts “headertype: $headertype”
           puts “body      : $body”
           puts “”
          }

          Results in:

          Code:

          headertype: Impression
          body      : *—————— Impression ——————*~IMPRESSION:~1. UNCHANGED APPEARANCE OF SUBMENTAL LYMPH NODE.~2. NO EVIDENCE OF STONE.  NO ABNORMALITY SEEN UNDER THE BARIUM MARKER PLACED ON~    THE PATIENT’S LEFT CHEEK.~~

          headertype: Report
          body      : *——————– Report ——————–*~~Reason for Exam:  COUGH (786.20)~~NECK WITHOUT CONTRAST~~COMPARISON:  CT of the neck 02/16/2007, CT neck 06/10/2005.~~FINDINGS:  Again seen is an approximately 1.2 cm submental node, not~significantly changed in appearance compared to studies dating back to~06/10/2005.  No new lymphadenopathy identified within the neck.~~Barium marker placed on the left cheek is seen, just superior to an accessory~parotid gland.  Parotid glands appear symmetric.  There is no evidence of ~stone.~This appearance is also unchanged from prior studies dating back to 2005.~~Limited views of the brain are grossly unremarkable.~~Visualized lung apices appear clear.~~Scattered mucous retention cysts seen in the maxillary sinuses bilaterally.~~~Electronically Signed By: RALPH JENSEN, MD~Date:  09/22/2008 14:29~~

          headertype: Addendum to Report
          body      : *————– Addendum to Report ————–*~~CT NECK WO CONTRAST~~This is a test addendum with no changes to impression.~~~Electronically Signed By: RALPH JENSEN, MD~Date:  09/23/2008 10:11~~

          headertype: Addendum to Report
          body      : *————– Addendum to Report ————–*~~CT NECK~~This is the 2nd addendum for this report.~~~Electronically Signed By: RALPH JENSEN, MD~Date:  09/23/2008 12:45~~

          headertype: Changes to Impression
          body      : *———— Changes to Impression ————-*~IMPRESSION:  A CT NECK WITH CONTRAST IS RECOMMENDED TO BE PERFORMED AS SOON AS~POSSIBLE.~~

          headertype: Addendum to Report
          body      : *————– Addendum to Report ————–*~~CT NECK NI~~~Electronically Signed By: RALPH JENSEN, MD~Date:  09/24/2008 07:54

          in reply to: x12 278 and United Healthcare – anyone doing this? #62940
          Nathan Martin
          Participant

            Sure Jim,

            Once I realized that a 2000C is only a Subscriber loop because HL03==”22″, things started to make sense.

            Also I had to get over the shock that the HIPAA variant doesn’t magically know about things like HL03 codes. 🙂

            One more thing that helps is to look at the data.  For display purposes I like to add newlines after each segment with perl or sed:

            perl -pe ‘s/~/~n/g’ sample_x12.nl | more

            ISA*00*          *00*          *ZZ*XXXXXXXXX      *ZZ*99999999       *051102*1434*U*00401*000000001*0*P*>~

            GS*HB*9999999*E999999*20161108*23003716*0*004010X092A1*~

            ST*271*000000001~

            […]

            (Various other parsing/validation tools are also usefull at the beginning, but I wouldn’t become too dependent on them.  It’s just data after all.)

            Nathan

            in reply to: x12 278 and United Healthcare – anyone doing this? #62938
            Nathan Martin
            Participant

              Charlie,

              If the messages are correct X12 format, then don’t worry about what the testing tool says.

              I suspect the problem you are seeing is that the testing tool is trying to re-parse the output message with a HIPAA variant, which is not designed for parsing.

              If you want to check the results, then save the xlate test results to a file, and read that in using the X12 format testing tool with a non-hipaa variant selected.

              Also, study the non-hipaa specs from X12 for the messages you are interested in.  It makes everything much simpler when you eliminate all the A B C loops.  (For example, HL7 doesn’t have NK1A-Emergency Contact, NK1B-Next of Kin, and NK1C-Other Contact “loops”… and we don’t built the HL7 formats that way either.)

              Hope that Helps,

              Nathan M.

              in reply to: Unsupported Transaction IDs #63440
              Nathan Martin
              Participant

                Does the wild card expression have to match the whole transaction id?


                tcl>set regexp {ADT_A(10|12)}

                tcl>for {set i 1} {$i < 40} {incr i} {
                [code]
                tcl>set regexp {ADT_A(10|12)}

                tcl>for {set i 1} {$i < 40} {incr i} {

                in reply to: X12 and Cloverleaf(R) 5.2 #63050
                Nathan Martin
                Participant

                  Jim,

                  Quote:

                  error message “[0:Test] [mid:0x000033c] The # 2 segment encountered ‘HL’ is not defined for message type ‘270’. Segment ignored.”.

                  This error may have been from the testing tool trying to reparse the translated message for details.  (The HIPAA formats might make message generation easier, but they fail at input.)

                  Try turning detail level to 0 and saving to a file, then read that file with the X12 format tester and a non-HIPAA variant.  (You’ll notice that the addresses are different between formats.)

                  Nathan

                  in reply to: Help!! What is the problem?? #62531
                  Nathan Martin
                  Participant

                    I like gdbm.  It’s quirky and fun.

                    You don’t say what version you are using, but starting around 5.3 rev something (we use AIX 5.3 Rev 2) a new process appeared: hcigdbm

                    If it is running, try killing it and running the script below from the hci command line.  (Also, stop processes that use xlt_query_gdbm first.)

                    Code:


                    #!/hci/qdx5.3/integrator/bin/tcl
                    #
                    # test_gdbm.tcl
                    #
                    # Run this as the hci user before
                    # starting processes that use gdbm
                    # commands.  This makes sure the
                    # hcigdbm server is operational.
                    #

                    set DBNAME TMP_TESTGDBM.dbm
                    set TESTVALUE “test value [clock format [clock seconds]]”

                    gdbm_open $DBNAME wc
                    gdbm_insert $DBNAME testkey $TESTVALUE
                    gdbm_close $DBNAME

                    gdbm_open $DBNAME r
                    set value_read [gdbm_fetch $DBNAME testkey]

                    if {[string compare $TESTVALUE $value_read] == 0} {
                       puts “SUCCESS: $TESTVALUE”
                    } else {
                       puts “DID NOT WORK”
                    }

                    file delete $DBNAME

                    in reply to: error message #61502
                    Nathan Martin
                    Participant

                      Noticed something like this the other day.  It is probably code like “{KILL $saved_mh}” and the saved_mh variable is empty.  Maybe you’re not ‘saving’ the message in your send ok procs.

                      in reply to: Resends with protocol UPOC #61322
                      Nathan Martin
                      Participant

                        Too bad.  The documentation (QDX 5.3) says that PROTO and SEND would work:

                        PROTO Places on outbound post-TPS queue.

                        SEND Places on inbound post-TPS queue.

                        I spent some time working on a Write UPOC designed to feed an oubound query through an external program and send back a response message.  I had to give up and switch to http-client protocol.

                        An http proc can create and OVER the query response.

                        Now, besides being able to send the response mesage back in a timely fashion, I can use recover33-style procs and not lose any query messages if the external program dies.  (I do end up having to recreate the reply as a data type after the kill_ob_save, but it works well enough.)

                        Thanks,

                        Nathan

                        in reply to: Opening status – WSAEWOULDBLOCK/WSAEINVAL #58232
                        Nathan Martin
                        Participant

                          I use 60 or 90 seconds for Await Replies and check Auto-reconnect with a Reopen time of 5 seconds.

                          Close after write is usually UNchecked because I don’t like dropping connections on purpose — but it might be a good idea for particularly troublesome VPN issues.

                          Never have checked “Use DRIVERCTL control” on a PDL TCP/IP.  Not sure what it does.  (Documentation says it will reconnect the connection after a write.  I got the idea you could use it to reconnect to a different address or port, assuming you have a proc to update DRIVERCTL.)

                          If possible, we also have the network admins set their connection / vpn session timeouts for longer than the time we expect to see between messages.

                          in reply to: Opening status – WSAEWOULDBLOCK/WSAEINVAL #58230
                          Nathan Martin
                          Participant

                            Ever try an “Await Replies” Timeout of something other than -1?  And/or using “Close after write” in the protocol setup?

                            Just a thought.

                            in reply to: 5.5 Problem with msgread and german "umlaut" #60795
                            Nathan Martin
                            Participant

                              On my version (5.3) the UserGuide2.pdf, Chapter 9, has several sections dealing with Unicode issues:

                              “Compatibility with Previous Releases”

                              “Using Tcl 8.3.1 Unicode Features”

                              “European Character Set Support”

                              Seach for the terms like: ‘encoding’, ‘utf-8’, ‘non-ASCII’, ‘fconfigure’

                              There were various work-arounds.  Maybe you don’t need them now with 5.5, or maybe you switched platforms and the system encodings are different.  (ISO8859-1 vs CP1252)

                              in reply to: Spring 2007 time change #60337
                              Nathan Martin
                              Participant

                                Apparently, you can get by with just updating the TZ environment variable.  (And it’s the only option if your oslevel is less than 5)

                                “Managing the Time Zone Variable”

                                http://www-1.ibm.com/support/docview.wss?rs=0&uid=isg3T1000252” class=”bbcode_url”>http://www-1.ibm.com/support/docview.wss?rs=0&uid=isg3T1000252

                                It will be interesting to see QDX’s recommendation.

                                Personally, if I had room for all the prerequisite fixes (could be 800MB?!), I’d probably chose the APARs:  mostly because I suspect that changing TZ alone might shift old filestamps off by an hour during extended parts of daylight savings time (not that anybody would really notice), but also just to keep the system updated.

                                in reply to: Script to write to {process}.log and {process}.log.old #60194
                                Nathan Martin
                                Participant

                                  It might help to know “why” you are asking, but I can guess.

                                  If you just want to force logs to cycle.  This will rename the existing logs with ‘.old’ for the adt process:

                                  Code:

                                  hcicmd -p adt -c ‘. output_cycle’

                                  We have a script that runs every night which first adds a date stamp to *.err files then cycles the logs.  Basically, something like this for each process:

                                  Code:

                                  DATESTAMP=`date +%Y%m%d`
                                  PROC=adt
                                  ERRFILE=$HCISITEDIR/exec/processes/$PROC/$PROC.err
                                  mv $ERRFILE $ERRFILE.$DATESTAMP
                                  hcicmd -p $PROC -c ‘. output_cycle’


                                  (Overwriting yesterday’s *.log.old is good enough for us.  A cron job deletes *.err.YYYYMMDD files older than a certain age so they don’t pile up.)

                                  If you are worried about losing messages in *.old files (which get created accidentally or automatically) you could try modifying hcienginerun to safely move or rename any existng .log and .err files before hciengine is called.  Or you could make a script to rescue .log.old and .err.old files on a periodic basis.  (I’ve thought about it, but never tried it.)

                                  By the way, hciengine must be what does the re-naming (and not some script) based on the incriminating printf-style formats found in the executable and the fact that it’s the only place I could find any “.old” references.

                                  Code:

                                  $ strings `which hciengine` | grep old

                                  %s.log.old
                                  %s.err.old

                                  Automatic cycling of output log files: eoLogFileCycleThreshold:%d kB logFileSize:%d kB errFileSize:%d kB


                                  (Hmmm, eoLogFileCycleThreshold seems suspicious too… but I can’t recall anything about it right now.)

                                Viewing 15 replies - 1 through 15 (of 45 total)